package com.hellprototypes.hellwatch.assistant;

public class Common {
    public static final  int SERVICE_CMD_INIT       = 0;
    public static final  int SERVICE_CMD_BEEP       = 1;
    public static final  int SERVICE_CMD_FEEDBACK   = 2;
    public static final  int SERVICE_CMD_REQ_EN_BT   = 3;
    public static final  int SERVICE_CMD_START_SCAN  = 4;

    public final static String HWA_ACTION    = "com.hellprototypes.hellwatch.HW_Assistant";
    public final static String HWIR_ACTION    = "com.hellprototypes.hellwatch.HW_IRremote";

    public final static String BUNDLE_KEY_NAME_CMD  = "com.hellprototypes.hellwatch.HW_Assistant.cmd";
    public final static String BUNDLE_KEY_NAME_MSG  = "com.hellprototypes.hellwatch.HW_Assistant.msg";
    public final static String BUNDLE_KEY_NAME_STEP  = "com.hellprototypes.hellwatch.HW_Assistant.step";
    public final static String BUNDLE_KEY_NAME_NOTE  = "com.hellprototypes.hellwatch.HW_Assistant.note";

    public final static String BUNDLE_KEY_IR_DATA  = "com.hellprototypes.hellwatch.HW_IRremote.data";
    public final static String BUNDLE_KEY_IR_FLOAD  = "com.hellprototypes.hellwatch.HW_IRremote.loadfile";
    public final static String BUNDLE_KEY_IR_TLOAD  = "com.hellprototypes.hellwatch.HW_IRremote.loadfile.TV";

    public final static String BUNDLE_KEY_IR_CTRL_IDX  = "com.hellprototypes.hellwatch.HW_IRremote.ctrl.index";
    public final static String BUNDLE_KEY_IR_CH_NAME  = "com.hellprototypes.hellwatch.HW_IRremote.channel.name";

    public final static String BUNDLE_KEY_IR_SEND  = "com.hellprototypes.hellwatch.HW_IRremote.sendIR";

    public static final  int IR_KEY_INDEX_LIST[]  = {
            0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,//KEY0 ~ KEY9
            0x10,//back
            0x11,//ch_down
            0x12,//ch_up
            0x13,//exit
            0x14,//menu
            0x15,//mute
            0x16,//ok
            0x17,//pwr_off1
            0x18,//pwr_off2
            0x19,//vol_down
            0x1A,//vol_up
            0x1B,0x1C,0x1D,0x1E,0x1F,//RFU
            0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,//RFU
    };

    public static String byte2hex(byte [] buffer) {
        String h = "";
        for (int i = 0; i < buffer.length; i++) {
            String temp = Integer.toHexString(buffer[i] & 0xFF);
            if (temp.length() == 1) {
                temp = "0" + temp;
            }
            h = h + temp + " ";
        }
        return h;
    }

    public final static String FZ_TV_CH_List[] = {
        "001 福州-1新闻",
        "002 福州-2影视",
        "003 福州-3生活",
        "004 福州-4少儿",
        "005 福建-1综合",
        "006 福建-2东南卫视",
        "007 CCTV-1",
        "008 CCTV-2",
        "009 CCTV-3",
        "010 CCTV-4",
        "011 CCTV-5",
        "012 CCTV-6",
        "013 CCTV-7",
        "014 CCTV-8",
        "015 CCTV-9纪录",
        "016 CCTV-10",
        "017 CCTV-新闻",
        "018 福建3-公共",
        "019 福建4-新闻",
        "020 福建5-影视",
        "021 福建6-综艺",
        "022 福建7-经济",
        "023 福建8-体育",
        "024 福建海峡卫视",
        "025 福建9-少儿",
        "026 CCTV-少儿",
        "027 CCTV-音乐",
        "028 北京卫视",
        "029 东方卫视",
        "030 浙江卫视",
        "031 江苏卫视",
        "032 天津卫视",
        "033 黑龙江卫视",
        "034 湖南卫视",
        "035 湖北卫视",
        "036 江西卫视",
        "037 贵州卫视",
        "038 重庆卫视",
        "039 广东卫视",
        "040 辽宁卫视",
        "041 山东卫视",
        "042 安徽卫视",
        "122 测试频道1",
        "123 测试频道1",
        "124 福州导视",
        "071 福州导视"
    };
}
